package com.hehua.StrategyPattern;

public class Client {
    public static void main(String[] args) throws IllegalAccessException, InstantiationException {
        MovieTicket mt = new MovieTicket();
        double originalPrice  = 60.0;
        double currentPrice;

        mt.setPrice(originalPrice);
        System.out.println("原始价为"+originalPrice);
        System.out.println("--------------------");

        Discount discount;
        discount = StudentDisCount.class.newInstance();
        mt.setDiscount(discount);

        currentPrice = mt.getPrice();
        System.out.println("折后价为"+currentPrice);

    }
}
